package com.homedo.odin.solution.model.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * @author ZhangLei
 * @date 2018-05-15
 * @description 热搜关键词
 */
@Data
@TableName("hot_keyword")
public class HotKeyword extends Model<HotKeyword> {

    private static final long serialVersionUID = 1L;


    /**
     * 唯一标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 关键词名称
     */
    @TableField(value = "name")
    @ApiModelProperty(value = "关键词名称")
    @NotNull(message = "关键词名称不能为空")
    private String name;
    /**
     * 是否高亮，0：否，1：是
     */
    @TableField(value = "highlight")
    @ApiModelProperty(value = "是否高亮")
    @NotNull(message = "高亮不能为空")
    private Integer highlight;
    /**
     * 排序
     */
    @TableField(value = "sort")
    @ApiModelProperty(value = "排序")
    @NotNull(message = "排序不能为空")
    private Integer sort;
    /**
     * 是否删除， 0：否，1：是
     */
    @TableField(value = "is_del")
    private Integer isDel;
    /**
     * 创建时间
     */
    @TableField(value = "created_time")
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;
    /**
     * 创建用户标识
     */
    @TableField(value = "created_by")
    @ApiModelProperty(value = "创建用户标识")
    @NotNull(message = "创建用户标识不能为空")
    private Long createdBy;
    /**
     * 最近修改时间
     */
    @TableField(value = "modified_time")
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date modifiedTime;
    /**
     * 最近修改用户标识
     */
    @TableField(value = "modified_by")
    @ApiModelProperty(value = "修改用户标识")
    @NotNull(message = "修改用户标识不能为空")
    private Long modifiedBy;

    /**
     * 操作人
     */
    @TableField("operator")
    @ApiModelProperty(value = "操作人")
    private String operator;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
